package game.helper;

import game.entity.AbsSprite;
import game.shared.Constants;

public class MovingRight extends MovingController {

	@Override
	public void run(AbsSprite sprite) {
		if(sprite.haveState(Constants.SPRITE_RUN_RIGHT))
		{
			sprite.setPosition(sprite.getX() + speed, sprite.getY());
			if(sprite.getCurrentState() != Constants.SPRITE_RUN_RIGHT)
				sprite.setState(Constants.SPRITE_RUN_RIGHT);
		}
	}
	
	public MovingRight(float speed)
	{
		this.speed = speed;
	}

}
